package org.mobai.flow.pojo.bpmn;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeId;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Data;
import org.mobai.flow.pojo.bpmn.node.*;

import java.util.List;

/**
 * @author Administrator
 */
@Data
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = Node.class, visible = true)
@JsonSubTypes({
        @JsonSubTypes.Type(value = StartEvent.class, name = "start"),
        @JsonSubTypes.Type(value = UserTask.class, name = "approval"),
        @JsonSubTypes.Type(value = EndEvent.class, name = "end"),
        @JsonSubTypes.Type(value = ExclusiveGateWay.class, name = "exclusive"),
        @JsonSubTypes.Type(value = ConditionNode.class, name = "condition"),
})
public class Node {
    private String id;
    @JsonTypeId
    private String type;
    private String pid;
    private String name;
    private List<Listener> executionListeners;
    private List<FormProperty> formProperties;
    private Node child;
    private Operations operations;
}
